﻿#include <iostream>
#include <cctype>
#include <climits>
using namespace std;

int main() {
	cout << "该处理系统的字符和字符编码：\n";

	for (char i = 0; ; i++) {
		switch (i) {
		case '\a':
			cout << "\\a"; break;
		case '\b':
			cout << "\\b"; break;
		case '\f':
			cout << "\\f"; break;
		case '\n':
			cout << "\\n"; break;
		case '\r':
			cout << "\\r"; break;
		case '\t':
			cout << "\\t"; break;
		case '\v':
			cout << "\\v"; break;
		default: 
			cout << ' ' << (isprint(i) ? i : ' ');
		}

		cout << ' ' << hex << int(i) << '\n';

		if (i == CHAR_MAX) break;
	}

	cin.get();
}